// vite.config.ts
import { defineConfig } from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import Components from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/unplugin-vue-components/dist/vite.js";
import NutUIResolver from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/@nutui/auto-import-resolver/dist/index.mjs";
import vueSetupExtend from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/vite-plugin-vue-setup-extend/dist/index.mjs";
import requireTransform from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/vite-plugin-require-transform/dist/index.mjs";
import viteCompression from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/vite-plugin-compression/dist/index.mjs";
import path from "path";
import { visualizer } from "file:///D:/_Work/BY/Projects/pkbeth5/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
var __vite_injected_original_dirname = "D:\\_Work\\BY\\Projects\\pkbeth5";
var alias = {
  "@": path.resolve(__vite_injected_original_dirname, "src"),
  "vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js",
  "@components": path.resolve(__vite_injected_original_dirname, "src/components"),
  "#": path.resolve(__vite_injected_original_dirname, "./")
};
var vite_config_default = defineConfig({
  // base: './',
  plugins: [
    vue({
      template: {
        compilerOptions: {
          // treat all tags with a dash as custom elements
          isCustomElement: (tag) => tag === "iconpark-icon"
        }
      }
    }),
    Components({
      resolvers: [NutUIResolver()]
    }),
    requireTransform({
      fileRegex: /.ts$|.vue$/
    }),
    vueSetupExtend(),
    viteCompression({
      ext: ".gz",
      algorithm: "gzip",
      // 或 'brotli'
      threshold: 5120
      // 小于 10KB 的文件不进行压缩
    })
  ],
  css: {
    preprocessorOptions: {
      scss: {
        api: "modern"
      }
    }
  },
  resolve: { alias },
  server: {
    host: "0.0.0.0",
    port: 3e3
  },
  build: {
    outDir: "dist",
    // 修改输出文件夹名称
    chunkSizeWarningLimit: 1e3,
    rollupOptions: {
      // 将资源分类到各自文件夹
      output: {
        chunkFileNames: "resource/js/[name]-[hash].js",
        entryFileNames: "resource/js/[name]-[hash].js",
        assetFileNames: "resource/[ext]/[name]-[hash].[ext]",
        compact: true,
        manualChunks(id) {
          if (id.includes("node_modules/vue") || id.includes("node_modules/vue-router")) {
            return "vue-vendor";
          }
          if (id.includes("node_modules")) {
            const moduleName = id.split("node_modules/")[1].split("/")[0];
            if (["pinia"].includes(moduleName)) {
              return "vendor";
            }
          }
          if (id.includes("node_modules")) {
            const moduleName = id.split("node_modules/")[1].split("/")[0];
            return moduleName;
          }
        }
      },
      plugins: [visualizer({
        open: true,
        // 自动打开浏览器
        filename: "dist/stats.html",
        // 输出路径
        gzipSize: true,
        // 显示压缩后大小
        brotliSize: true
        // 显示 Brotli 压缩后大小
      })]
    },
    target: "esnext",
    minify: "terser",
    // cssCodeSplit: true, // 启用 CSS 代码拆分
    sourcemap: false,
    // 构建后是否生成 source map 文件
    terserOptions: {
      //去除console和debugger
      compress: {
        // drop_console: true,
        drop_debugger: true
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxfV29ya1xcXFxCWVxcXFxQcm9qZWN0c1xcXFxwa2JldGg1XCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJEOlxcXFxfV29ya1xcXFxCWVxcXFxQcm9qZWN0c1xcXFxwa2JldGg1XFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9EOi9fV29yay9CWS9Qcm9qZWN0cy9wa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